package lab.southpark.demo.control.services.fake.data
{
	import com.southpark.framework.control.proxies.IProxy;
	
	import lab.southpark.demo.control.services.fake.BaseFakeService;
	import lab.southpark.demo.control.services.fake.FakeResultEvent;
	
	
	public class FakeGetDataService extends BaseFakeService
	{	
       
		public function FakeGetDataService(proxy:IProxy)
		{
   			super(proxy);
   			delay = 100;
		}

        override protected function fakeExecute():void
        {
        	var resultEvent:FakeResultEvent = new FakeResultEvent();
        	
        	switch (backendMethod)
        	{
        		case "getData1":
        		{
        			resultEvent.result = 
		        	[
		        		{item1:"data1_11",item2:"data1_12"},
		        		{item1:"data1_21",item2:"data1_22"},
		        		{item1:"data1_31",item2:"data1_32"}
		        	];
		        	break;
        		}
        		
        		case "getData2":
        		{
        			resultEvent.result = 
		        	[
		        		{item1:"data_02_01_01",item2:"data_02_01_02"},
		        		{item1:"data_02_02_01",item2:"data_02_02_02"},
		        		{item1:"data_02_03_01",item2:"data_02_03_02"},
		        		{item1:"data_02_04_01",item2:"data_02_04_02"},
		        		{item1:"data_02_05_01",item2:"data_02_05_02"},
		        		{item1:"data_02_06_01",item2:"data_02_06_02"},
		        		{item1:"data_02_07_01",item2:"data_02_07_02"},
		        		{item1:"data_02_08_01",item2:"data_02_08_02"},
		        		{item1:"data_02_09_01",item2:"data_02_09_02"},
		        		{item1:"data_02_10_01",item2:"data_02_10_02"},
		        		{item1:"data_02_11_01",item2:"data_02_11_02"},
		        		{item1:"data_02_12_01",item2:"data_02_12_02"},
		        		{item1:"data_02_13_01",item2:"data_02_13_02"},
		        		{item1:"data_02_14_01",item2:"data_02_14_02"},
		        		{item1:"data_02_15_01",item2:"data_02_15_02"},
		        		{item1:"data_02_16_01",item2:"data_02_16_02"},
		        		{item1:"data_02_17_01",item2:"data_02_17_02"},
		        		{item1:"data_02_18_01",item2:"data_02_18_02"},
		        		{item1:"data_02_19_01",item2:"data_02_19_02"},
		        		{item1:"data_02_20_01",item2:"data_02_20_02"}
		        	];
		        	break;
        		}
        	};
        	

        	proxy.onServiceSuccess(resultEvent);
        }

	}
}